/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.lucava.lib.client.view;

import com.google.gwt.event.shared.EventBus;
import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.Widget;

/**
 *
 * @author glenn
 */
public class MvcView extends Composite {

    final EventBus eventBus;

    public MvcView(EventBus eventBus) {
        this.eventBus = eventBus;
    }

    public EventBus getEventBus() {
        return eventBus;
    }

    @Override
    public void fireEvent(GwtEvent<?> event) {
        getEventBus().fireEvent(event);
    }

    @Override
    public Widget asWidget() {
        return this;
    }
}
